package com.chs.recoginition.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

/**
 * @Author CHS
 * @Date 2022/9/1 18:19
 * @Version 1.0
 * 用户验证码
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@RedisHash(value = "userEmailCode",timeToLive = 300L)
public class UserEmailCodeResult {

    /**
     * 标识符
     */
    @Id
    private Integer id;

    /**
     * 账号
     */
    @Indexed
    private String username;

    /**
     * 类型
     */
    @Indexed
    private String type;

    /**
     * 验证码
     */
    private String code;
}
